<template>
  <!-- 拼团列表页 -->
  <div id="group_list">
    <c-title :hide="false" :text="diyTitle"></c-title>
    <div class="content">
      <van-pull-refresh v-model="isLoading" @refresh="loadTop" success-text="刷新成功">
        <div v-for="(item, index) in info" :key="index">
          <group-list-cell
            :thumb="item.has_one_goods && item.has_one_goods.thumb"
            :title="item.title"
            :group_price="item.has_many_option_levels && item.has_many_option_levels[0] && item.has_many_option_levels[0].group_price"
            :price="item.has_many_option_levels && item.has_many_option_levels[0] && item.has_many_option_levels[0].has_one_fight_groups_option.option_price"
            :teamList="showNowGroup?item.allTeamData:[]"
            :num="item.has_many_option_levels[0] && item.has_many_option_levels[0].member_num"
            :id="item.id"
            :storeid="item.store_id"
            @click="goGroup"
            @openTeam="getAllTeam"
          ></group-list-cell>
        </div>
      </van-pull-refresh>
    </div>

    <p v-if="this.info.length < 1" style="padding: 1rem 0; color: #f60;" @click="goHome">暂无拼团活动，去商城逛逛吧！</p>

    <group-list-item v-model="show" :id="selectID"></group-list-item>
  </div>
</template>

<script>
import group_list_controller from "./group_list_controller";

export default group_list_controller;
</script>

<style lang="scss" rel="stylesheet/scss" scoped>
#group_list {
  background: #f6f6f6;
}
</style>
